import log4js from 'log4js'
import * as path from "node:path";

log4js.configure({
    appenders: {
        console: {type: 'console'},
        // file: {
        //     type: 'fileSync',
        //     filename: `${path.join(__dirname, "../logs/app.log")}`,
        //     keepFileExt:true,
        //     daysToKeep:3,
        //     maxLogSize: 10485760,
        //     backups: 3,
        //     compress: true
        // }
    },
    categories: {
        default: {appenders: ['console'], level: 'debug'}
    }
});

const logger = log4js.getLogger();

export {
    logger
}

